Optimal. Leaf size=132 \[ \frac {2 a^{5/2} c \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^3 c \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}-\frac {2 a^4 c \tan ^3(e+f x)}{f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3989, 3972,
472, 209} \begin {gather*} \frac {2 a^{5/2} c \text {ArcTan}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {2 a^5 c \tan ^5(e+f x)}{5 f (a \sec (e+f x)+a)^{5/2}}-\frac {2 a^4 c \tan ^3(e+f x)}{f (a \sec (e+f x)+a)^{3/2}}-\frac {2 a^3 c \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 472
Rule 3972
Rule 3989
Rubi steps
\begin {align*} \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x)) \, dx &=-\left ((a c) \int (a+a \sec (e+f x))^{3/2} \tan ^2(e+f x) \, dx\right )\\ &=\frac {\left (2 a^4 c\right ) \text {Subst}\left (\int \frac {x^2 \left (2+a x^2\right )^2}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {\left (2 a^4 c\right ) \text {Subst}\left (\int \left (\frac {1}{a}+3 x^2+a x^4-\frac {1}{a \left (1+a x^2\right )}\right ) \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac {2 a^3 c \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}-\frac {2 a^4 c \tan ^3(e+f x)}{f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {\left (2 a^3 c\right ) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {2 a^{5/2} c \tan ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^3 c \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}-\frac {2 a^4 c \tan ^3(e+f x)}{f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.84, size = 110, normalized size = 0.83 \begin {gather*} -\frac {a^2 c \left (-10 \text {ArcTan}\left (\sqrt {-1+\sec (e+f x)}\right ) \cos ^2(e+f x)+(3+6 \cos (e+f x)+\cos (2 (e+f x))) \sqrt {-1+\sec (e+f x)}\right ) \sec ^2(e+f x) \sqrt {a (1+\sec (e+f x))} \tan \left (\frac {1}{2} (e+f x)\right )}{5 f \sqrt {-1+\sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(302\) vs.
\(2(118)=236\).
time = 0.18, size = 303, normalized size = 2.30
method | result | size |
default | \(-\frac {c \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \left (5 \sin \left (f x +e \right ) \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {5}{2}} \left (\cos ^{2}\left (f x +e \right )\right ) \sqrt {2}+10 \sin \left (f x +e \right ) \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {5}{2}} \cos \left (f x +e \right ) \sqrt {2}+5 \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {2}}{2 \cos \left (f x +e \right )}\right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {5}{2}} \sin \left (f x +e \right )-8 \left (\cos ^{3}\left (f x +e \right )\right )-16 \left (\cos ^{2}\left (f x +e \right )\right )+16 \cos \left (f x +e \right )+8\right ) a^{2}}{20 f \sin \left (f x +e \right ) \cos \left (f x +e \right )^{2}}\) | \(303\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1501 vs.
\(2 (126) = 252\).
time = 0.61, size = 1501, normalized size = 11.37 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.35, size = 382, normalized size = 2.89 \begin {gather*} \left [\frac {5 \, {\left (a^{2} c \cos \left (f x + e\right )^{3} + a^{2} c \cos \left (f x + e\right )^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (a^{2} c \cos \left (f x + e\right )^{2} + 3 \, a^{2} c \cos \left (f x + e\right ) + a^{2} c\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{5 \, {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2}\right )}}, -\frac {2 \, {\left (5 \, {\left (a^{2} c \cos \left (f x + e\right )^{3} + a^{2} c \cos \left (f x + e\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (a^{2} c \cos \left (f x + e\right )^{2} + 3 \, a^{2} c \cos \left (f x + e\right ) + a^{2} c\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{5 \, {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - c \left (\int \left (- a^{2} \sqrt {a \sec {\left (e + f x \right )} + a}\right )\, dx + \int \left (- a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\right )\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.43, size = 227, normalized size = 1.72 \begin {gather*} -\frac {\frac {5 \, \sqrt {-a} a^{3} c \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{{\left | a \right |}} - \frac {2 \, {\left (\sqrt {2} a^{5} c \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 5 \, \sqrt {2} a^{5} c \mathrm {sgn}\left (\cos \left (f x + e\right )\right )\right )} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a\right )}^{2} \sqrt {-a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a}}}{5 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________